Skip to content

Conversation

@jsenellart
Copy link
Contributor

Motivation

  • Rework the previously added MIS implementation so it lives as a simulator backend instead of an algorithm, matching the intended design where MIS is a sampling backend.
  • Avoid bundling verification helpers in Perceval (verification to remain external) and rely on an existing strong simulator for exact probabilities.
  • Provide a reproducible MCMC-style sampler with configurable burn-in and RNG seeding.

Description

  • Remove the algorithm-level file perceval/algorithm/mis.py and stop exporting MIS from the algorithm package.
  • Add a new backend implementation perceval/backends/_mis.py implementing MISBackend that builds a distinguishable-photon proposal from |U|^2, applies MIS acceptance using exact probabilities from the SLOS backend, and supports burn_in and seed parameters.
  • Register the backend by adding MISBackend to BACKEND_LIST and exposing it under the name "MIS" in perceval/backends/__init__.py so it can be created via BackendFactory.get_backend("MIS", ...) or Processor("MIS", ...).
  • Ensure MISBackend delegates target probability evaluation to the existing SLOSBackend rather than embedding verification code.

Testing

  • No automated tests were added or executed for this change.
  • Basic repository inspection and file creation were performed (files added/removed and BACKEND_LIST updated) but no unit or integration tests were run.
  • Manual smoke-checks (listing and viewing modified files) were performed in the development environment and succeeded.
  • Recommend adding unit tests for MISBackend.samples/sample and integration tests exercising Processor("MIS") in a follow-up PR.

Codex Task

@jsenellart jsenellart closed this Jan 9, 2026
@jsenellart jsenellart deleted the codex/implement-mis-algorithm-with-perceval branch January 9, 2026 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant